﻿#ifndef ICONHELPER_H
#define ICONHELPER_H

#include <QtCore>
#include <QtGui>
#if (QT_VERSION > QT_VERSION_CHECK(5,0,0))
#include <QtWidgets>
#endif

class IconHelper : public QObject
{
    Q_OBJECT
public:
    static IconHelper* Instance();
    explicit IconHelper(QObject *parent = NULL);

    void setIcon(QLabel *lab, const QChar &str, quint32 size = 12);
    void setIcon(QAbstractButton *btn, const QChar &str, quint32 size = 12);


protected:


private:
    static QScopedPointer<IconHelper> self;
    QFont iconFont;             //图形字体

};

#endif // ICONHELPER_H
